package objects;

import java.awt.event.ItemEvent;
import java.awt.event.ItemListener;

import javax.swing.JCheckBox;

import clue.editor.ClueFrame;

public class ClueCheckBox extends JCheckBox {

	private static final long serialVersionUID = 1L;

	public ClueCheckBox(String text)
	{
		super(text);
		addItemListener(getEditAction());
	}
	
	private ItemListener getEditAction()
	{
		return new ItemListener() {
			
			@Override
			public void itemStateChanged(ItemEvent e) {
				ClueFrame.getInstance().addEdit();
			}
		};
	}	
}
